import "@/utils/js-plus"

import dayjs from "dayjs";
import dayOfYear from 'dayjs/plugin/dayOfYear'
import customParseFormat from 'dayjs/plugin/customParseFormat'

dayjs.extend(customParseFormat)
dayjs.extend(dayOfYear)


// #ifdef MP-WEIXIN
wx.uni = uni;
// #endif

//处理全局数据
uni.globalData = {
  "systemInfo": uni.getSystemInfoSync(),
  "name": "美业", //当前平台名称
  "host": ((location || {}).origin) || "http://s1.a.haoyangsoft.com", //当前部署地址，H5推广时用得到
  "refreshTokenForceLogin": false, //刷新 token 未登录时是否强制登录
  "requestForceLogin": false, //请求中未登录时是否强制登录
};

import Vue from 'vue'

Vue.prototype.uni = uni;

import bigDecimal from "@/utils/js-big-decimal.js";

uni.bigDecimal = bigDecimal;


import core from "@/utils/core.js";

uni.core = core;
Vue.prototype.core = core;

//二维码生成
import uQRCode from '@/utils/uqrcode.js';
Vue.prototype.$QRCode = uQRCode;


//请求的封装文件
import req from "@/utils/request.js";

uni.req = req;
Vue.prototype.req = req;


//轻量级路由拦截
import route from "@/router";

uni.route = route;
Vue.prototype.route = route;
Vue.mixin(route.mixin);


import uniPlus from "@/utils/uni-plus";

Vue.use(uniPlus)

import App from './App'

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()
